#ifndef QTACTIVEOBJECT_H
#define QTACTIVEOBJECT_H

#include "qactivemessage.h"

#include <QThread>
#include <QMutex>
#include <queue>


class QtActiveObject : protected QThread
{
    Q_OBJECT
public:

    QtActiveObject();
    ~QtActiveObject();

    void send(QActiveMessage * msg);

protected:
    virtual void run();

private:
  // (suppress copying if in C++)

//  TODO  std::unique_ptr
    QActiveMessage *done;

    QMutex que_mutex;
    std::queue<QActiveMessage *> mq;

};

#endif // QTACTIVEOBJECT_H
